package com.dict.process;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dict.classes.User;

public class DelUserProcess {

	public void doProcess(HttpServletRequest request,
            HttpServletResponse response) throws Exception {
		
		String strUserId = request.getParameter("userId");

		User user = new User();
		user.load(Integer.parseInt(strUserId));

		try {
			user.delete();
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		finally
		{
			response.sendRedirect("index.jsp?content=delUser");
		}
	}
}